package com.zmzncs.shop.module.shop.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zmzncs.shop.module.shop.pojo.shopgoods.ShopGoods;
import com.zmzncs.shop.module.shop.pojo.shopgoods.ShopGoodsDTO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.shop.module.shop.pojo.shopgoods.ShopGoodsSearchForm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 商户-商品 Mapper 接口
 * </p>
 *
 * @author 高博文
 * @since 2021-05-25
 */
@Repository
@Mapper
public interface ShopGoodsMapper extends BaseMapper<ShopGoods> {

      /** 分页 */
      IPage<ShopGoodsDTO> list(Page page, @Param("form") ShopGoodsSearchForm form);

      /** 详情 */
      ShopGoodsDTO getById(Long id);

      /**商户商品数量*/
      Integer getCountByShopId(Long shopId);

}
